package com.example.design.command;

public class FunctionButton {
	private Command command;
	private String name;
	
	public FunctionButton(String name){
		this.name = name;
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setCommand(Command command) {
		this.command = command;
	}
	
	public void onClick() {
		System.out.print("点击功能键："+ name + "\n"); 
		command.execute();
	}
}
